package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

/**
 * 用户实体类
 */
@TableName("t_user")
public class UserBean {
    /**用户id*/
    @TableId(value = "pk_userId",type = IdType.AUTO)
    private Integer userId;
    /**用户名*/
    @TableField("u_name")
    private String name;
    /**用户密码*/
    @TableField("u_pwd")
    private String pwd;
    /**注册时间*/
    @TableField("u_register")
    private LocalDate register = LocalDate.now();
    /**用户邮件*/
    @TableField("u_mail")
    private String mail;
    /**用户头像*/
    @TableField("u_img")
    private String img;

    public UserBean() {
    }

    public UserBean(String name, String pwd, String mail, String img) {
        this.name = name;
        this.pwd = pwd;
        this.mail = mail;
        this.img = img;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public LocalDate getRegister() {
        return register;
    }

    public void setRegister(LocalDate register) {
        this.register = register;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "userId=" + userId +
                ", name='" + name + '\'' +
                ", pwd='" + pwd + '\'' +
                ", register=" + register +
                ", mail='" + mail + '\'' +
                ", img='" + img + '\'' +
                "}\n";
    }
}
